package com.qmhl.toolposition.fragment.msg

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.qmhl.toolposition.databinding.FragmentMsgSystemBinding

/**
 * @author: lqhl
 * @createTime: 2023-11-04  23:17
 * @description: 系统消息
 */
class MsgSystemFragment : Fragment() {

    private lateinit var binding: FragmentMsgSystemBinding
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        binding = FragmentMsgSystemBinding.inflate(inflater, container, false)
        initData()
        initListener()
        return binding.root
    }

    private fun initListener() {

    }

    private fun initData() {

        binding.refreshLayout.setOnRefreshListener { refresh ->
            refresh.finishRefresh(1000 /*,false*/) //传入false表示刷新失败
        }


        binding.refreshLayout.setOnLoadMoreListener { refresh ->
            refresh.finishLoadMore(1000 /*,false*/) //传入false表示加载失败
        }

    }
}